#ifndef __NVBRWALKER__H
#define __NVBRWALKER__H

#include "RunFinder.h"
#include "View.h"

class NVBRWalker : protected View
{
public:
	struct Info {
		Run m_r1, m_r2;
		S32 m_nCol;
	};
	
	NVBRWalker(const Image *pImage, F64 nRow, F64 nCol, F64 nAngle, Run runUp, Run runDown);
	
	U8 GetPix(F64 nRow, F64 nCol) const { return View::GetPix(nRow, nCol) > 127 ? 255 : 0; } 
	
	bool CanWalk(U32 nSteps, bool bPathAllowedToEnd, Info *pInfo);
	bool Walk(); /* unimplemented for now */
private:
	bool CanWalkWorker(U32 nSteps, S32 nCol, Run r, Run r2, bool bPathAllowedToEnd, Info *pInfo);
	Run m_runUp;
	Run m_runDown;
	RunFinder<NVBRWalker> m_rf;
};
#endif//__NVBRWALKER__H
